from pyltp import SentenceSplitter
f=open('data/test.txt', 'r', encoding='utf-8')
sentence=f.read()
def sentence_splitter(sentence=sentence):
    sents = SentenceSplitter.split(sentence)  # 分句
    print(sents)
    return sents
fj=open('data\sp.txt','w',encoding='utf-8')
for sent in sentence_splitter():
    if sent=='':
        pass
    else:
        fj.write(sent+'\n')
fj.close()